package com.chance.cc.crawler.prod.command.trigger.domain.news.ifeng;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.ifeng.realtime.IFengArticleRealtimeCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.news.ifeng.realtime.IFengCarRealtimeCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @ClassName song
 * @Description TODO
 * @Author ding
 * @Date 2021/9/3 14:14
 * @Version 1.0
 * 凤凰网 汽车板块 车系文章采集
 **/
public class ifengArticleCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {
       publishIFengRealtimeScheduleTriggerInfo();
    //publishIFengRealtimeScheduleTriggerInfoTest();
      //  publishIFengCarRealtimeScheduleTriggerInfoTest();
    }
    public static void publishIFengRealtimeScheduleTriggerInfoTest(){
        CrawlerJob crawlerJob = IFengArticleRealtimeCrawlerSchedulerJob.crawlerScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                IFengArticleRealtimeCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "凤凰汽车板块车系文章临时采集任务");
    }

    public static void publishIFengRealtimeScheduleTriggerInfo(){
        CrawlerJob crawlerJob = IFengArticleRealtimeCrawlerSchedulerJob.crawlerScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                IFengArticleRealtimeCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
                "凤凰新闻实时采集任务，每天一点采集 一次");
    }
    public static void publishIFengCarRealtimeScheduleTriggerInfoTest(){
        CrawlerJob crawlerJob = IFengCarRealtimeCrawlerScheduleJob.crawlerScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                IFengArticleRealtimeCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "凤凰汽车板块车系文章临时采集任务");
    }
}
